#include <gtk/gtk.h>

GtkWidget * window;
GtkWidget * button;
GtkWidget * grid;

GtkWidget * create(GtkWidget * widget, int x, int y, int w, int h)
{
	gtk_grid_attach(GTK_GRID(grid), widget, x, y, w, h);
	return widget;
}
void builder()
{
	// Create main window
	window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
	gtk_window_set_title           (GTK_WINDOW   (window), "Example");
	gtk_window_set_resizable       (GTK_WINDOW   (window), FALSE);
	gtk_container_set_border_width (GTK_CONTAINER(window), 3);
	g_signal_connect               (window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
	
	// Create grid
	grid = gtk_grid_new();
	gtk_grid_set_row_spacing(GTK_GRID(grid),    2);
	gtk_grid_set_column_spacing(GTK_GRID(grid), 2);
	gtk_container_add(GTK_CONTAINER(window), grid);
	
	// Create widgets
	button          = create(gtk_button_new_with_label("Click me"), 0,0,1,1);

	gtk_widget_show_all(window);
}
